package expressions.slogo;

import java.util.List;
import parsing.Separates;
import parsing.Token;

@Token(regex = "&")
@Separates
public class And extends BooleanOperator
{
    public And()
    {
        super(2);
    }

    @Override
    public int priority()
    {
        return Priority.LOGICAL.adjust(Modifier.MIDDLE);
    }

    @Override
    protected boolean combineBooleans(List<Boolean> results)
    {
        return results.get(0) && results.get(1);
    }

}
